The present invention relates generally to data processing systems and, more particularly, to deadlock-free routing.
Networks comprise a number of nodes that are interconnected via links. As used herein, the term xe2x80x9cnodexe2x80x9d refers to any device capable of communicating, such as a computer, router, switch, network processor, or symmetric multi-processor. The specific configuration of nodes and links in a network is referred to as the xe2x80x9cnetwork topology.xe2x80x9d
Each node routes network traffic by interacting with internal buffers that store packets. Specifically, each of a node""s links typically has an associated buffer (xe2x80x9creceive bufferxe2x80x9d) that temporarily stores packets received via the link, and each of a node""s links typically has an associated buffer (xe2x80x9csend bufferxe2x80x9d) that temporarily stores packets before they are sent across the link. When a packet is received by a node that is not its destination, the packet arrives in one of the node""s receive buffers. The node then determines which link to send the packet over using a routing algorithm. After the appropriate link is selected, the packet is stored in that link""s send buffer for transmission. However, sometimes the node at the other end of the selected link is busy; in which case, the receive buffer for the link may be full. Thus, the packet cannot be sent and remains in the send buffer until the other node""s receive buffer is emptied. As a result, network traffic can form congestion which can lead to deadlock.
Deadlock occurs when a cycle of multi-hop packets are each waiting on a busy node on the next hop. A xe2x80x9cmulti-hopxe2x80x9d packet refers to a packet that is routed through at least one node before reaching its destination. A deadlock may occur, for example, in a network of three nodes (node 1, node 2 and node 3), where node 1 is waiting to send a multi-hop packet to node 2 (which is not the packet""s destination), where node 2 is waiting to send a multi-hop packet to node 3 (which is not the packet""s destination), and where node 3 is waiting to send a multi-hop packet to node 1 (which is not the packet""s destination). Since each node is waiting on the other, a statement or deadlock occurs, and these nodes are rendered nonoperational.
To prevent deadlock from occurring, some networks have been developed that route traffic using predefined calculations. One family of networks that routes traffic in this way includes the hypercube networks depicted in FIG. 1A. The hypercube family of networks are configured according to a predefined pattern. The hypercube networks accommodate only networks with a number of nodes that can be expressed as a power of 2. Accordingly, FIG. 1A depicts the hypercube networks having 2, 4, 8, and 16 nodes. The pattern that the hypercube networks follow is apparent from an examination of the different topologies.
To prevent deadlock in the hybercube networks, routing is performed using predefined calculations. For example, FIG. 1B depicts an example of a hypercube network of 8 nodes that performs this type of routing. Each node of the network is associated with a binary number (e.g., 010). When routing a packet through the network, each node performs a calculation to determine to which node to send the packet. According to this calculation, the number of the current node is compared to the number of the destination node of the packet to find the most significant bit that differs. The packet is then forwarded to a node whose number differs from the number of the current node in exactly that bit position. For example, node 000 will send a packet destined for node 111 to node 100 instead of 010 or 001, because the third bit position (from the right) is the most significant. This calculation is performed at each node until the destination node is reached. Use of this calculation on each node prevents deadlock by preventing a cycle from occurring in the network. That is, there are no sequences of multi-hop packets that form a cycle. However, configuring the networks using a predefined pattern and using the predefined calculations to perform routing leads to inefficient routing, because little attention is given to optimizing either the network topology or the routing to reduce communications overhead. For example, traffic routed from node 000 to node 111 must take 3 hops: starting at 000 and traveling to 100, to 110, and then to 111. It is thus desirable to improve network configuration and routing to reduce communication overhead.
In accordance with methods and systems consistent with the present invention, an improved deadlock-free routing system is provided to a family of network topologies where both the configuration of the networks and the routings are designed to optimize performance. In this system, each network utilizes static routing tables that perform deadlock-free routing in an optimized manner to reduce the amount of communication overhead when routing traffic. Specifically, the routings in accordance with methods and systems consistent with the present invention require no more than two hops for networks up to a size of 16 nodes. As a result, the deadlock-free routing provided in accordance with methods and systems consistent with the present invention incurs less communications overhead than some conventional systems while still avoiding deadlock.
In accordance with methods consistent with the present invention, a method is provided in a network containing nodes. According to this method, a first of the nodes receives a packet from a second of the nodes, accesses a statically-defined routing table to determine a third of the nodes to send the packet to such that a deadlock is avoided, and sends the packet to the third node.
In accordance with systems consistent with the present invention, a computer-readable memory device encoded with a routing table data structure for use in routing traffic in the network of nodes is provided. The routing table data structure comprises an entry indicating a next node for sending a received packet in such a manner as to avoid deadlock.
In accordance with systems consistent with the present invention, a distributed system with nodes and links interconnecting the nodes is provided. Each node contains a static routing table for use in routing a packet received from a first of the nodes to a second of the nodes to avoid deadlock.